package com.itheima.bakery.demos.web.service;
import com.itheima.bakery.demos.web.model.Order;
import com.itheima.bakery.demos.web.model.User;
import java.util.List;
import java.util.Optional;

public interface UserService {
    List<User> findAllUsers();
    Optional<User> findUserById(Integer id);
    User saveUser(User user);
    void deleteUser(Integer id);
    Optional<User> findUserByEmail(String email); // 新增方法
    List<Order> findOrdersByUserId(Integer userId);
}
